<template>
    <van-sticky>
        <van-nav-bar
        :title="$route.meta.title?$route.meta.title:$store.getters.title"
        :left-arrow="$route.meta.back"
        v-on:click-left="onClickLeft"
        >
            <template #right>
                <router-link to="/">
                    <van-icon name="home-o" size="18" />
                </router-link>
            </template>
        </van-nav-bar>
    </van-sticky>
</template>
<script>
export default {
    name:'Header',
    data() {
        return {
            
        }
    },
    methods:{
        onClickLeft(){
            this.$router.go(-1);
        }
    }
}
</script>